<!DOCTYPE html>
<html lang="zh">
<head>
    {include file="Public/header"}
    <link rel="stylesheet" href="__STATIC__/layout/css/gyq.css">
    <link rel="stylesheet" href="__STATIC__/layout/css/demo.css" type="text/css">

</head>
<body style="color:#333;padding:3px;" class="x_sorll">
<div class="page-heade">
    <h2 class="title_color text-center">公共信息</h2>
</div>
<div>
    <form action="" class="form-inline">
        <table class="row-margin-top tab-content table-bordered table text-left" border="1">
            <tbody>
                <tr>
                    <td style="width:13.33%;" class="text-right"><label for="" class="form-label">主题：</label></td>
                    <td style="width:20%;"><input type="text" class="form-control" name="title" value="{$title}"></td>
                    <td style="width:13.33%;" class="text-right"><label for="" class="form-label">类型：</label></td>
                    <td style="width:20%;">
                        <select name="lx" id="" class="form-control">
                            <option value="">请选择</option>
                            {volist name="lxs" id="row"}
                            <option value="{$row.id}" {if $lx==$row.id}selected{/if}>{$row.title}</option>
                            {/volist}
                        </select>
                    <td style="width:7.33%;" class="text-right"><label for="" class="form-label">发布日期：</label></td>
                    <td style="width:26%;"><input type="text" class="form-control layer-date" name="start" id="start" value="{$start}"  size="15">到<input type="text" class="form-control layer-date" name="end" id="end" value="{$end}" size="15"></td>
                </tr>
                <tr>
                    <td colspan="6" class="text-center">
                        <button class="btn btn-info btn-sm query" type="submit">查询</button>
                        <button class="btn btn-info btn-sm emptyIf" type="button">清空</button>
                    </td>
                </tr>
            </tbody>
        </table>

        <table class="table row-margin-top table-bordered text-center bud_hei">
            <tbody>
                <tr class="info text-center">
                    <th class="text-center">NO.</th>
                    <th class="text-center">类型</th>
                    <th class="text-center">主题</th>
                    <th class="text-center">发布日期</th>
                    <th class="text-center">发布人</th>
                </tr>
                {volist name="data" id="row" key="k"}
                <tr>
                    <td>{$k}</td>
                    <td>{$row.lxmc}</td>
                    <td><a href="{:url('view',['id'=>$row.id])}" class="J_menuItem">{$row.title}</a></td>
                    <td>{$row.fbrq}</td>
                    <td>{$row.fbr_name}</td>
                </tr>
                {/volist}
            </tbody>
        </table>
        <h5>
            {$page}
        </h5>
    </form>
</div>
</body>
{include file="Public/footer"}
<script src="__STATIC__/layout/js/plugins/layer/laydate/laydate.js"></script>
<script src="__STATIC__/layout/js/contabs_sub.js"></script>
<script>
    $('.emptyIf').on('click',function () {
        $(this).closest('form').find('input[type=text]').val('')
        $(this).closest('form').find('select').val('')
        $(this).closest('form').submit()

    })

    //日期范围限制
    var start = {
        elem: '#start',
        format: 'YYYY-MM-DD 00:00:00',
        min: laydate.now(), //设定最小日期为当前日期
        max: '2099-06-16 23:59:59', //最大日期
        istime: true,
        istoday: false,
        choose: function (datas) {
            end.min = datas; //开始日选好后，重置结束日的最小日期
            end.start = datas //将结束日的初始值设定为开始日
        }
    };
    var end = {
        elem: '#end',
        format: 'YYYY-MM-DD 23:59:60',
        min: laydate.now(),
        max: '2099-06-16 23:59:59',
        istime: true,
        istoday: false,
        choose: function (datas) {
            start.max = datas; //结束日选好后，重置开始日的最大日期
        }
    };
    laydate(start);
    laydate(end);
</script>
</html>